
- name: install fedmsg-irc
  yum: pkg=fedmsg-irc state=present
  tags:
  - packages
  - fedmsg/irc

- name: install python-fedmsg-meta-fedora-infrastructure
  yum: pkg=python-fedmsg-meta-fedora-infrastructure state=present
  tags:
  - packages
  - fedmsg/irc

- name: ensure that nrpe has rights to monitor us
  file: >
    dest=/var/run/fedmsg/monitoring-fedmsg-irc.socket
    mode=0775
    owner=fedmsg
    group=nrpe
    state=file
  ignore_errors: true
  tags:
  - fedmsgmonitor

- name: enable on boot and start fedmsg-irc
  service: name=fedmsg-irc state=started enabled=true
  tags:
  - services
  - fedmsg/irc
  notify:
  - restart fedmsg-irc

- name: setup fedmsg-irc config file
  template: src=ircbot.py dest=/etc/fedmsg.d/ircbot.py
  tags:
  - config
  - fedmsg/irc
  notify:
  - restart fedmsg-irc

- name: setup fas credentials config file
  template: >
    src=fas-credentials.py
    dest=/etc/fedmsg.d/fas-credentials.py
    mode=0640
    owner=fedmsg
    group=fedmsg
  tags:
  - config
  - fedmsg/irc
  notify:
  - restart fedmsg-irc
